<?php
	// AJAX live search - Goi y ket qua
	if($_REQUEST['do']=='search_goi_y_ket_qua')
		{
			$ketqua = $dtc_do->load('class_search')->goi_y_ket_qua($_REQUEST['tieu_de'], 'sanpham', 'tieu_de');
			foreach($ketqua as $key=>$value)
				{
					$result .= $dtc_template->template_replace('live_search/ket_qua_goi_y',$value);
				}
			echo $dtc_template->template_replace('live_search/khung_ket_qua_goi_y', $result);
			exit;
		}
		
	// AJAX live search - Goi y chuyen muc
	if($_REQUEST['do']=='search_goi_y_chuyen_muc')
		{
			$ketqua = $dtc_do->load('class_search')->goi_y_ket_qua($_REQUEST['tieu_de'], 'category_index', 'tieu_de');
			foreach($ketqua as $key=>$value)
				{
					$result .= '<option id="goi_y_chuyen_muc" value="'.$value['id'].'">'.$value['tieu_de'].'</option>
					';
				}
			echo $dtc_template->template_replace('live_search/ket_qua_chuyen_muc', $result);
			exit;
		}
?>